using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Panel : MonoBehaviour
{
    public Panel m_PreviousPanel;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {

    }
    public virtual void Show()
    {
        gameObject.SetActive(true);
    }
    public virtual void Hide()
    {
        gameObject.SetActive(false);
    }
    public void OnCloseButtonClicked()
    {
        if (m_PreviousPanel)
        {
            m_PreviousPanel.Show();
            m_PreviousPanel = null;
        }
        Hide();
    }
}
